home *** CD-ROM | disk | FTP | other *** search
/ Amiga CD-Sensation: Golden Games / Amiga CD-Sensation - Ausgabe 2 - Golden Games (1996)(GTI - Schatztruhe)(DE)[!].iso / Brain Activity / Rubik / source / sequences.c < prev    next >
Text File  |  1990-08-11  |  3KB  |  183 lines

  1. /*    move sequences for solving the cube (inefficiently)    */
  2.  
  3.  
  4. unsigned char corner1 [23][3] =
  5. {
  6. {2,14,1},
  7. {2,7,2},
  8. {1,2,0},
  9. {1,8,0},
  10. {2,17,3},
  11. {1,1,0},
  12. {2,10,3},
  13. {1,13,0},
  14. {1,3,0},
  15. {2,16,2},
  16. {2,11,1},
  17. {2,15,1},
  18. {1,7,0},
  19. {1,14,0},
  20. {1,9,0},
  21. {2,17,2},
  22. {2,8,2},
  23. {1,15,0},
  24. {2,13,1},
  25. {2,10,1},
  26. {2,12,1},
  27. {2,11,3},
  28. {2,16,3}
  29. };
  30.  
  31. unsigned char corner2 [20][4] =
  32. {
  33. {3,17,10,18},
  34. {3,16,4,18},
  35. {2,12,18,0},
  36. {3,11,5,18},
  37. {2,10,16,0},
  38. {3,12,5,18},
  39. {1,16,0,0},
  40. {2,10,18,0},
  41. {2,6,18,0},
  42. {2,4,17,0},
  43. {3,5,11,18},
  44. {2,4,18,0},
  45. {1,17,0,0},
  46. {3,4,11,16},
  47. {2,5,18,0},
  48. {2,6,17,0},
  49. {2,11,18,0},
  50. {1,18,0,0},
  51. {2,5,17,0},
  52. {2,11,16,0}
  53. };
  54.  
  55. unsigned char corner3 [17][5] =
  56. {
  57. {3,11,5,12,0},
  58. {3,12,4,10,0},
  59. {3,12,5,12,0},
  60. {3,10,4,10,0},
  61. {1,11,0,0,0},
  62. {2,6,12,0,0},
  63. {4,5,11,4,10},
  64. {2,5,10,0,0},
  65. {2,4,12,0,0},
  66. {4,4,10,5,12},
  67. {2,6,10,0,0},
  68. {2,5,12,0,0},
  69. {3,11,4,10,0},
  70. {1,10,0,0,0},
  71. {1,12,0,0,0},
  72. {4,4,11,4,10},
  73. {2,4,10,0,0}
  74. };
  75.  
  76. unsigned char corner4 [14][8] =
  77. {
  78. {6,10,6,11,17,6,16,0},
  79. {6,17,6,16,10,6,11,0},
  80. {7,6,17,5,16,10,6,11},
  81. {3,10,6,11,0,0,0,0},
  82. {3,17,6,16,0,0,0,0},
  83. {7,4,17,5,16,10,6,11},
  84. {3,10,4,11,0,0,0,0},
  85. {4,5,17,6,16,0,0,0},
  86. {7,5,17,5,16,10,6,11},
  87. {4,4,17,6,16,0,0,0},
  88. {3,17,5,16,0,0,0,0},
  89. {6,17,5,16,10,6,11,0},
  90. {3,13,11,14,0,0,0,0},
  91. {3,8,16,7,0,0,0,0}
  92. };
  93.  
  94. unsigned char corner5 [6] [6] =
  95. {
  96. {14,2,13,7,2,8},
  97. {7,1,8,14,1,13},
  98. {8,2,7,17,2,16},
  99. {17,1,16,8,1,7},
  100. {10,2,11,13,2,14},
  101. {13,1,14,10,1,11}
  102. };
  103.  
  104. unsigned char edge1 [23] [10] =
  105. {
  106. {9,1,8,11,15,9,12,16,8,11},
  107. {6,7,10,17,8,11,1,0,0,0},
  108. {8,9,12,5,7,10,13,7,10,0},
  109. {6,8,11,14,7,10,2,0,0,0},
  110. {8,9,12,4,8,11,16,8,11,0},
  111. {7,1,7,10,18,8,11,1,0,0},
  112. {6,1,8,11,13,7,10,0,0,0},
  113. {8,1,5,9,12,4,9,12,4,0},
  114. {8,1,4,7,10,17,8,11,5,0},
  115. {6,1,9,12,4,9,12,0,0,0},
  116. {6,2,8,11,14,7,10,0,0,0},
  117. {6,2,9,12,5,9,12,0,0,0},
  118. {6,1,7,10,17,8,11,0,0,0},
  119. {8,1,4,9,12,4,9,12,5,0},
  120. {8,1,5,7,10,17,8,11,4,0},
  121. {8,13,1,9,12,4,9,12,14,0},
  122. {8,13,2,8,11,14,7,10,14,0},
  123. {8,16,2,9,12,5,9,12,17,0},
  124. {8,16,1,7,10,17,8,11,17,0},
  125. {8,14,1,9,12,4,9,12,13,0},
  126. {8,14,2,8,11,14,7,10,13,0},
  127. {8,17,2,9,12,5,9,12,16,0},
  128. {8,17,1,7,10,17,8,11,16,0}
  129. };
  130.  
  131. unsigned char edge2 [22] [14] =
  132. {
  133. {6,7,10,17,8,11,1,0,0,0,0,0,0,0},
  134. {8,9,12,5,7,10,13,7,10,0,0,0,0,0},
  135. {6,8,11,14,7,10,2,0,0,0,0,0,0,0},
  136. {8,9,12,4,8,11,16,8,11,0,0,0,0,0},
  137. {13,1,7,10,18,7,10,5,8,11,17,8,11,1},
  138. {12,1,7,10,18,7,10,6,7,10,13,7,10,0},
  139. {3,5,19,4,0,0,0,0,0,0,0,0,0,0},
  140. {3,5,20,4,0,0,0,0,0,0,0,0,0,0},
  141. {1,19,0,0,0,0,0,0,0,0,0,0,0,0},
  142. {1,20,0,0,0,0,0,0,0,0,0,0,0,0},
  143. {1,21,0,0,0,0,0,0,0,0,0,0,0,0},
  144. {1,22,0,0,0,0,0,0,0,0,0,0,0,0},
  145. {3,5,21,4,0,0,0,0,0,0,0,0,0,0},
  146. {3,5,22,4,0,0,0,0,0,0,0,0,0,0},
  147. {3,13,19,14,0,0,0,0,0,0,0,0,0,0},
  148. {3,13,20,14,0,0,0,0,0,0,0,0,0,0},
  149. {3,16,21,17,0,0,0,0,0,0,0,0,0,0},
  150. {3,16,22,17,0,0,0,0,0,0,0,0,0,0},
  151. {3,14,19,13,0,0,0,0,0,0,0,0,0,0},
  152. {3,14,20,13,0,0,0,0,0,0,0,0,0,0},
  153. {3,17,21,16,0,0,0,0,0,0,0,0,0,0},
  154. {3,17,22,16,0,0,0,0,0,0,0,0,0,0}
  155. };
  156.  
  157. unsigned char edge3 [4] [9] =
  158. {
  159. {8,7,10,16,7,10,4,9,12},
  160. {6,2,8,11,14,7,10},
  161. {8,8,11,13,8,11,5,9,12},
  162. {6,1,7,10,17,8,11}
  163. };
  164.  
  165. unsigned char edge4 [5] [6] =
  166. {
  167. {3,7,10,18,8,11},
  168. {15,8,11,6,7,10},
  169. {18,8,11,3,7,10},
  170. {6,8,11,18,7,10},
  171. {18,7,10,6,8,11}
  172. };
  173.  
  174. unsigned char edge5 [6] [5] =
  175. {
  176. {13,1,7,14,2},
  177. {2,16,7,1,17},
  178. {4,14,7,5,13},
  179. {16,2,8,17,1},
  180. {14,4,8,13,5},
  181. {5,17,8,4,16}
  182. };
  183.